﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GeneralSearch.aspx.cs"
    Inherits="PPAP.Web.SearchReport.GeneralSearch" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register TagPrefix="cc1" Namespace="PPAP.WebControls" Assembly="PPAP.WebControls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="../Common/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
    <form id="Form1" runat="server">
    <div>
        <table width="980px" style="border-color: #2A48CE; border: 1px; border-style: solid;
            border-color: Gray; border-spacing: 0px;">
            <tr style="height: 32px;">
                <td style="font-weight: bold;" bgcolor="#D7D7D7" colspan="2">
                    Log
                </td>
            </tr>
            <tr>
                <td style="width: 50%;">
                    <fieldset style="background-color: #D7D7D7; border-color: #2A48CE; border: 1px; border-style: solid;
                        border-color: Gray; border-spacing: 0px;">
                        <legend style="border-color: #2A48CE; border: 1px; border-style: solid; border-color: Gray;
                            border-spacing: 0px;">PPAR</legend>
                        <table>
                            <tr>
                                <td>
                                    Created：
                                </td>
                                <td>
                                    <cc1:My97 ID="txtCreateStart" runat="server"></cc1:My97>
                                    --<cc1:My97 ID="txtCreateEnd" runat="server"></cc1:My97>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Supplier：
                                </td>
                                <td>
                                    <asp:TextBox ID="txtSupper" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
                <td>
                    <fieldset style="background-color: #D7D7D7; border-color: #2A48CE; border: 1px; border-style: solid;
                        border-color: Gray; border-spacing: 0px;">
                        <legend style="border-color: #2A48CE; border: 1px; border-style: solid; border-color: Gray;
                            border-spacing: 0px;">Capbility</legend>
                        <table>
                            <tr>
                                <td>
                                    Q-engineer：
                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="txtQE" runat="server" Width="200px"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Document：
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlDocument" runat="server">
                                        <asp:ListItem>All</asp:ListItem>
                                        <asp:ListItem Value="1">Ok</asp:ListItem>
                                        <asp:ListItem Value="0">No Ok</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    Part：
                                </td>
                                <td>
                                    <asp:DropDownList ID="ddlPart" runat="server">
                                        <asp:ListItem>All</asp:ListItem>
                                        <asp:ListItem Value="1">ok</asp:ListItem>
                                        <asp:ListItem Value="0">Not ok</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td style="width: 50%;">
                    <fieldset style="background-color: #D7D7D7; border-color: #2A48CE; border: 1px; border-style: solid;
                        border-color: Gray; border-spacing: 0px;">
                        <legend style="border-color: #2A48CE; border: 1px; border-style: solid; border-color: Gray;
                            border-spacing: 0px;">Inspection </legend>
                        <table>
                            <tr>
                                <td>
                                    Inspection：
                                </td>
                                <td>
                                    <asp:RadioButton ID="RadioButton1" runat="server" Text="Started" GroupName="a" />
                                    &nbsp;&nbsp;&nbsp;
                                    <asp:RadioButton ID="RadioButton2" runat="server" Text="Not started" GroupName="a" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Overdue：
                                </td>
                                <td>
                                    <asp:RadioButton ID="RadioButton3" runat="server" Text="Yes" GroupName="b" />
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    <asp:RadioButton ID="RadioButton4" runat="server" Text="No" GroupName="b" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
                <td>
                    <fieldset style="background-color: #D7D7D7; border-color: #2A48CE; border: 1px; border-style: solid;
                        border-color: Gray; border-spacing: 0px;">
                        <legend style="border-color: #2A48CE; border: 1px; border-style: solid; border-color: Gray;
                            border-spacing: 0px;">Final result</legend>
                        <table>
                            <tr>
                                <td>
                                    Approval：
                                </td>
                                <td colspan="3">
                                    <asp:RadioButton ID="rbtWait" runat="server" Text="Wait" GroupName="c" />
                                    &nbsp;&nbsp;&nbsp;
                                    <asp:RadioButton ID="rbtApproved" runat="server" Text="approved" GroupName="c" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Result：
                                </td>
                                <td colspan="3">
                                    <asp:RadioButton ID="rbtG" runat="server" Text="G" GroupName="d" />
                                    &nbsp;&nbsp;
                                    <asp:RadioButton ID="rbtY" runat="server" Text="Y" GroupName="d" />
                                    &nbsp;&nbsp;
                                    <asp:RadioButton ID="rbtR" runat="server" Text="R" GroupName="d" />
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
            <tr style="display: none;">
                <td colspan="2">
                    <fieldset style="background-color: #D7D7D7; border-color: #2A48CE; border: 1px; border-style: solid;
                        border-color: Gray; border-spacing: 0px;">
                        <legend style="border-color: #2A48CE; border: 1px; border-style: solid; border-color: Gray;
                            border-spacing: 0px;">Output set up</legend>
                        <table width="100%">
                            <tr>
                                <td>
                                    Row:
                                </td>
                                <td>
                                    <asp:DropDownList ID="DropDownList3" runat="server">
                                        <asp:ListItem>All</asp:ListItem>
                                        <asp:ListItem>Quanlity engineer</asp:ListItem>
                                        <asp:ListItem>PPAR creat time</asp:ListItem>
                                        <asp:ListItem>PPAR status</asp:ListItem>
                                        <asp:ListItem>PPAR result </asp:ListItem>
                                        <asp:ListItem>Supplier </asp:ListItem>
                                        <asp:ListItem>Capability result</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    Column:
                                </td>
                                <td>
                                    <asp:DropDownList ID="DropDownList4" runat="server">
                                        <asp:ListItem>All</asp:ListItem>
                                        <asp:ListItem>Quanlity engineer</asp:ListItem>
                                        <asp:ListItem>PPAR creat time</asp:ListItem>
                                        <asp:ListItem>PPAR status</asp:ListItem>
                                        <asp:ListItem>PPAR result </asp:ListItem>
                                        <asp:ListItem>Supplier </asp:ListItem>
                                        <asp:ListItem>Capability result</asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </fieldset>
                </td>
            </tr>
            <tr>
                <td align="right" style="padding-right: 30px;">
                    <asp:Button ID="btnSearch" runat="server" CssClass="button" Text="Search" OnClick="btnSearch_Click" />
                </td>
            </tr>
        </table>
        <br />
        <asp:DataGrid ID="dgList" HeaderStyle-BackColor="#2E8AC5" HeaderStyle-Font-Bold="true"
            HeaderStyle-Height="32px" Width="100%" OnLoad="dgLoad" AutoGenerateColumns="False"
            runat="server">
            <Columns>
                <asp:BoundColumn DataField="rownum" HeaderText="No.">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="qlevel" HeaderText="Q-level">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="remarks" HeaderText="Remark">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:TemplateColumn HeaderText="Status">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# ShowAuditStatus(Eval("status").ToString()) %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="pparno" HeaderText="PPAR.No">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="bdntpartno" HeaderText="Part.No">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="SUPPLIERPARTNO" HeaderText="Suppiler.No">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:BoundColumn DataField="PPARVERSION" HeaderText="PPAR version">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:TemplateColumn HeaderText="Start date">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:Label ID="Label7" runat="server" Text='<%#Eval("ppardate").ToString()==""?"":DateTime.Parse(Eval("ppardate").ToString()).ToString("yyyy-MM-dd")  %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:TemplateColumn HeaderText="End date">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                    <ItemTemplate>
                        <asp:Label ID="Label8" runat="server" Text='<%#Eval("endtime").ToString()==""?"":DateTime.Parse(Eval("endtime").ToString()).ToString("yyyy-MM-dd")  %>'></asp:Label>
                    </ItemTemplate>
                </asp:TemplateColumn>
                <asp:BoundColumn DataField="FINALRESULT" HeaderText="Result">
                    <ItemStyle HorizontalAlign="Center"></ItemStyle>
                </asp:BoundColumn>
                <asp:TemplateColumn ItemStyle-HorizontalAlign="Center" HeaderText="View">
                    <ItemTemplate>
                        <asp:ImageButton ID="ImageButton2" CssClass="tt" ToolTip='view' PostBackUrl='<%# "../Part/CreatPPARWeb.aspx?rid="+Eval("ID")+"&his=1" %>'
                            ImageUrl='../Images/newimg/see.png' runat="server" />
                    </ItemTemplate>
                </asp:TemplateColumn>
            </Columns>
            <HeaderStyle BackColor="#E7E8E8" Font-Bold="True" Height="32px"></HeaderStyle>
        </asp:DataGrid>
        <webdiyer:AspNetPager ID="AspNetPager2" runat="server" Width="100%" ShowPageIndexBox="Always" CssClass="paginator"
            PageIndexBoxType="DropDownList" TextBeforePageIndexBox="goto" HorizontalAlign="Center"
            PageSize="20" EnableTheming="true" AlwaysShow="True" FirstPageText="|&lt;" LastPageText="&gt;|"
            NextPageText="&gt;" PrevPageText="&lt;" SubmitButtonText="Go" TextAfterPageIndexBox="page"
            InvalidPageIndexErrorMessage="Page index is not effective numerical！" OnPageChanged="AspNetPager2_PageChanged"
            PageIndexOutOfRangeErrorMessage="Page index beyond range" BackColor="#E7E8E8">
        </webdiyer:AspNetPager>
    </div>
    </form>
</body>
</html>
